package com.ruoyi.jproom.service.impl;

import com.ruoyi.jproom.entity.ImageInfo;
import com.ruoyi.jproom.mapper.ImageInfoMapper;
import com.ruoyi.jproom.service.ImageInfoService;
import com.ruoyi.jproom.utils.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zeo
 * @explain 文件接口实现类
 * @date 2020/8/3 10:14
 */
@Service
public class ImageInfoServiceImpl implements ImageInfoService{

    @Autowired
    ImageInfoMapper imageInfoMapper;

    @Override
    public int addImageFile(ImageInfo imageInfo) {
        imageInfo.setImageId(Utils.getUUID());
        return imageInfoMapper.addImageFile(imageInfo);
    }

    @Override
    public List<ImageInfo> findImageInfoListBySellId(String residentialId) {
        return imageInfoMapper.findImageInfoListBySellId(residentialId);
    }
}
